import time
from app import db
from app.models import User

# 将模型生成数据表
if __name__ == "__main__":
    user = User(
        name="admin456",
        password="123456",
        addtime=time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time())))
    try:
        db.session.add(user)
        db.session.commit()
    except:
        print("创建用户失败")
